package com.simple.util.common;

import java.util.Enumeration;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;

/**
 * The Class ASEPropertyLoad.
 */
public final class AESPropertyLoad {
    
    /** The prop resource bundle. */
    private static PropertyResourceBundle propResourceBundle;

    /**
     * Builds the.
     */
    protected void build() {
        propResourceBundle = (PropertyResourceBundle) ResourceBundle.getBundle("aes");
    }

    /**
     * Instantiates a new portal property load.
     */
    private AESPropertyLoad() {
        build();
    }

    /** The instance. */
    private static AESPropertyLoad instance = new AESPropertyLoad();

    /**
     * Gets the single instance of PortalPropertyLoad.
     * 
     * @return single instance of PortalPropertyLoad
     */
    public static AESPropertyLoad getInstance() {
        if (null == instance) {
            instance = new AESPropertyLoad();
        }

        return instance;
    }

    /**
     * Gets the string.
     * 
     * @param name
     *            the name
     * @return the string
     */
    public String getString(final String name) {
        return AESPropertyLoad.propResourceBundle.getString(name);
    }

    /**
     * Gets the keys.
     * 
     * @return the keys
     */
    @SuppressWarnings("rawtypes")
    public Enumeration getKeys() {
        return AESPropertyLoad.propResourceBundle.getKeys();
    }
}
